home *** CD-ROM | disk | FTP | other *** search
/ Champak 62 / Volume 62 - JOGO DISK .iso / Games / penguin_dinner.swf / scripts / __Packages / classes / ui / ResumeGameMenu.as < prev    next >
Text File  |  2008-03-17  |  917b  |  32 lines

  1. class classes.ui.ResumeGameMenu extends classes.ui.AbstractWidget
  2. {
  3.    function ResumeGameMenu()
  4.    {
  5.       super();
  6.       classes.core.SoundManager.getInstance().startSound("message_popup");
  7.       this.doLater(this.init);
  8.    }
  9.    function init()
  10.    {
  11.       this.resume_btn.addEventListener(classes.ui.TextButton.CLICK,this,"onButtonClick");
  12.       this.restart_btn.addEventListener(classes.ui.TextButton.CLICK,this,"onButtonClick");
  13.       this.resume_btn.unlock();
  14.       this.restart_btn.unlock();
  15.    }
  16.    function onButtonClick(e)
  17.    {
  18.       var _loc0_ = null;
  19.       if((_loc0_ = e.target) === this.restart_btn)
  20.       {
  21.          classes.core.Application.getInstance().resetGameToRestart();
  22.       }
  23.       classes.core.Application.getInstance().startGame();
  24.    }
  25.    function dispose()
  26.    {
  27.       this.resume_btn.dispose();
  28.       this.restart_btn.dispose();
  29.       super.dispose();
  30.    }
  31. }
  32.